saSGML Build Instructions

Requirements:
 JDK 1.6 (or greater)
 Ant (http://ant.apache.org) 
 C++ compiler

 
Build steps
  
 1. Download OpenSP from http://openjade.sourceforge.net/ 
 
 2. Configure and build the lib directory of OpenSP (either as an static or dynamic library). If you are building a shared library, it must be named osp152_32.dll or osp_152_64.dll. Copy the OpenSP config.h file to sasgml/native/sp/include.
 
 3. Build the native sources of saSGML as a shared library , which links against osp152_32.dll or osp_152_64.dll.
(Note that the build.xml still contains a "native" target that is intended to perform this step, but such target depends on the compiler settings and is no longer mantained)

 EXAMPLE (with MinGW64 in the classpath; X:\jdk1.7.0_45_64 is the location of the JDK; the current directory is sasgml/native)
 
 gcc sasgml.cpp -Isp\generic -Isp\include -IX:\jdk1.7.0_45_64\include -IX:\jdk1.7.0_45_64\include\win32 -fpermissive -DSP_MULTI_BYTE -DSP_NAMESPACE=OpenSP -lstdc++ -Lsp\lib -shared -static -m64 -osasgml_64.dll -losp152_64
  
 4. From the top-level project directory, run "ant jar"

 5. Optionally run "ant javadoc" in order to generate the project documentation.
 